#!/usr/bin/python
import os,sys

def damePar(n,hayArista):
	for i in range(0,n):
		for j in range(i+1,n):
			if i != j and not hayArista[i][j]:
				hayArista[i][j] = True
				return (i,j)
	return (-1,-1)
def peorCasoExacto(n,m):
	s = ""
	c = 0
	
	hayArista = []
	for i in range(0,n):
		hayArista.append([])
		for j in range(0,n):
			hayArista[i].append(False)

	while m > 0:
		s = s + "%d %d\n" % damePar(n,hayArista)
		m = m - 1

	print "%d %d" % (n,m)
	print s.strip()

def main():
	st = int(sys.argv[1])
	end = int(sys.argv[2])
	for i in range(st,end):
		peorCasoExacto(20,i)

if __name__ == "__main__":
	main()
